package com.agilegroup.crm.requests;

import com.agilegroup.crm.model.AppointmentList;
import com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest;

public class AppointmentJsonRequest extends SpringAndroidSpiceRequest<AppointmentList>{
	
	private String empId;
	private String url;
	
	public AppointmentJsonRequest(String empId,String url) {
		super(AppointmentList.class);
		this.empId=empId;
		this.url=url;
	}

	@Override
	public AppointmentList loadDataFromNetwork() throws Exception {
		return getRestTemplate().getForObject(url+empId+".json", AppointmentList.class);
	}
}
